<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <a href="./内置属性.html">Hello world!</a>

  <script>
    /**
     * elem.属性名
     *  ● 访问内置属性
     */
    const elem = document.querySelector('a')
    // 获取
    console.log('elem.href', elem.href)
    // 修改
    elem.href = 'https://www.baidu.com'
  </script>
</body>

</html>